<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./public.css">
    <style>
        html,body {
            width: 100%;
            height: 100%;
        }
        #car {
            width: 50%;
            height: 100%;
        }
        .list {
            width: 100%;
            height: 100px;
            /* background-color: aqua; */
            display: flex;
        }
        img {
            width: 100px;
            margin: 5px auto;
            display: block;
            margin-left: 20px;
        }
        .middle {
            width: 500px;
            /* background-color: antiquewhite; */

        }
        h3 {
            display: block;
            margin-bottom: 50px;
        }
        .price {
            color: red;
            font-size: 20px;
            float: left;
        }
        span {
            display: block;
            color: bisque;
            float: left;
            margin-top: 5px;
        }
        .right {
            flex: 1;
            display: flex;
        }
        button {
            width: 30px;
            height: 30px;
            border-radius: 20px;
        }
        .jian {
            color: blue;
            background-color: aliceblue;
            border: blue;
            margin-top: 30px;
        }
        .jia {
            color: white;
            background-color: blue;
            border: white;
            margin-top: 30px;
            /* margin-left: 40px; */
        }
        .num {
            margin-top: 30px;
            display: block;
            padding-left: 30px;
            padding-right: 30px;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
    <div id="car">
        <h2>已选商品</h2>
        <div class="list" v-for="(item,index) in tasklist" v-bind:key="index">
            <div class="left">
                <img v-bind:src="item.pic" alt="">
            </div>
            <div class="middle">
                <h3>{{item.name}}</h3>
                <p class="price">{{item.pirce}}</p>  <span>{{item.pone}}</span>
            </div>
            <div class="right">
                <button class="jian">-</button>
                <p class="num">1</p>
                <button class="jia">+</button>
            </div>
        </div>

        
    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script>
    var v  =  new Vue({
        el:'#car',
        data:{
            tasklist:[
                {pic:'./img/1.png',name:'秋刀鱼/斤',pirce:'￥35.00',sone:'￥40'},    {pic:'./img/2.png',name:'大带鱼/条',pirce:'￥45.00',pone:'￥60'},    {pic:'./img/3.png',name:'大虾/斤',pirce:'￥95.00',pone:'￥100'},
                {pic:'./img/1.png',name:'秋刀鱼/斤',pirce:'￥35.00',pone:'￥60'},
            ]
        }
    })
</script>